package com.duan.normal.mapper;


import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.duan.normal.beans.po.ProductPo;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * Created by duanlsh on 18/6/16.
 */
public interface ProductMapper extends BaseMapper<ProductPo> {

    @Results(
           id = "defaultMap" , value = {
            @Result(column = "product_id", property = "productId"),
            @Result(column = "product_name", property = "productName"),
            @Result(column = "product_desc", property = "productDesc")
        }
    )


//    @ResultMap("defaultMap")
    @Select("select * from product_info")
    List<ProductPo> list();


    List<ProductPo> listXML();
}
